package com.jimmy.medical.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonBackReference;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

/**
 * 服务定价
 * 
 * @author jimmy
 * @since 0.1
 */
@Entity
@Table(name = "service_price")
public class ServicePrice extends AbstractEntity {
	/** 服务菜单*/
	@JsonBackReference
	@ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "item_id")
    @NotFound(action = NotFoundAction.IGNORE)
    private ServiceItem item;
	/** 级别，字典*/
	@Column(name = "level", length = 64)
	private String level;
	/** 价格*/
	@Column(name = "price")
	private int price;
	
	@Column(name = "create_time", length = 20)
	private String createTime;
	@Column(name = "create_user", length = 50)
	private String createUser;
	@Column(name = "update_time", length = 20)
	private String updateTime;
	@Column(name = "update_user", length = 50)
	private String updateUser;
	
	public ServiceItem getItem() {
		return item;
	}
	public void setItem(ServiceItem item) {
		this.item = item;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public int getPrice() {
		return price;
	}
	public void setPrice(int price) {
		this.price = price;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public String getCreateUser() {
		return createUser;
	}
	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}
	public String getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
	public String getUpdateUser() {
		return updateUser;
	}
	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}
}
